Interview Questions and Answer
Options:
a. The salary of the employee is displayed
b. The OUTPUT keyword doesnot exist in procedures
c. RETURN keyword can not be used in procedures
d. No out put will be got, as @sal doesnot hold any value
Reveal Answer
Options:
a. Procedure returns error as RETURN statement cannot be used used in stored procedures
b. exec@sal=sp_emp_sal@empno statement is syntactically wrong so values returned does not come into @sal variable in the calling procedures
c. Successfully executes and displays the salary for a given employee
d. Invalid PRINT statement as the @sal has to be converted into string.
Reveal Answer
Options:
a. Cannot be utilized in SELECT statement
b. TRY and CATCH block cannot be used in the procedures
c. Procedures cannot be called from functions
d. We can go for transaction management
Reveal Answer
Options:
a. A single user
b. By a single user in a single application
c. By a single user in multiple applications
d. By multiple users in multiple applications
Reveal Answer
Options:
a. Input parameters
b. Output parameters
c. Only input parameters
d. Default parameters
Reveal Answer
Options:
a. Uni-directional
b. Bi-directional
Reveal Answer
Options:
a. sp_rename'employee.fkdeptno','deptno'
b. sp_ename'fkdeptno','deptno','column'
c. sp_rename'employee.fkdeptno','deptno','column
d. sp_renamecol'employee.fkdeptno','deptno'
Reveal Answer
Options:
a. SQL query in the stored procedure is parsed and compiled every time they are run
b. A stored procedure is a set of statements/commands which reside in the database.
c. Stored procedures are also useful when you want to do Batch updates on the db.
d. The network traffic reduces due to procedures than executing an adhoc query
Reveal Answer
Options:
a. The list of all parameters
b. The list of all functions
c. List of all stored procedures
d. List of all database objects which start with 'p'
Reveal Answer
Options:
a. EXECsp_helptext'sp_insert_empcopy'
b. sp_helptext'sp_insert_empcopy'
c. sp_help'sp_insert_empcopy'
d. None
Reveal Answer
Options:
a. NO, return statement is not allowed in the procedures
b. Return statement is allowed, but it cannot have mathematical expressions
c. YES, it is a valid statement
d. The sum of three values is calculated and the result is returned to the calling procedures
Reveal Answer
Options:
a. The code of the stored procedure can be changed without affecting application.
b. Stored procedure is cached in SQL Server’s memory.
c. By using stored procedures we can reuse the code.
d. All the above
Reveal Answer
Options:
a. The list of parameters which take the input values from the table 'EMPLOYEE'
b. To get the definition of procedures which have 'EMPLOYEE' table used
c. The list of parameters which give the output values from the table 'EMPLOYEE' to output parameters
d. The list of procedures in which the 'EMPLOYEE' is used.
Reveal Answer
Options:
a. DML statements which can change the existing database are not allowed
b. Only SELECT statement can be used.
c. Procedures are used to perform DML actions
d. Try and catch block cannot be used in procedures
Reveal Answer
Bestdotnet google plus